#pragma once

class DP1 {
   public:
    void draw_a_line(int x1, int y1, int x2, int y2);
    void draw_a_circle(int x, int y, int r);
};

class DP2 {
   public:
    void drawline(int x1, int x2, int y1, int y2);
    void drawcircle(int x, int y, int r);
};

class Shape {
   public:
    virtual void draw() = 0;
};

class Rectangle : public Shape {
   public:
    virtual void draw() = 0;

   protected:
    virtual void drawLine(int x1, int y1, int x2, int y2) = 0;
};

class V1Rectangle : protected Rectangle {
   public:
    void draw() override;

   protected:
    void drawLine(int x1, int y1, int x2, int y2) override;

   private:
    DP1 dp1;
    int x1, y1, x2, y2;
};

class V2Rectangle : protected Rectangle {
   public:
    void draw() override;

   protected:
    void drawLine(int x1, int y1, int x2, int y2) override;

   private:
    DP2 dp2;
    int x1, y1, x2, y2;
};

class Circle : public Shape {
   public:
    virtual void draw() = 0;

   protected:
    virtual void drawCircle(int x, int y, int r) = 0;
};

class V1Circle : protected Circle {
   public:
    void draw() override;

   protected:
    void drawCircle(int x, int y, int r) override;

   private:
    DP1 dp1;
    int x, y, r;
};

class V2Circle : protected Circle {
   public:
    void draw() override;

   protected:
    void drawCircle(int x, int y, int r) override;

   private:
    DP2 dp2;
    int x, y, r;
};
